//
//  ConvenienceOfServiceViewController.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/11/8.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "TWConvenienceOfServiceBody.h"
#import "ConvenienceOfServiceViewController.h"

@interface ConvenienceOfServiceViewController ()



@end

@implementation ConvenienceOfServiceViewController




- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"便民服务";
    self.navigationController.navigationBar.translucent = NO;
    self.edgesForExtendedLayout = UIRectEdgeTop;
    [self initializeViews];
    // Do any additional setup after loading the view.
}



- (void)initializeViews {
    
    UIScrollView *scrollView = [UIScrollView new];
    scrollView.showsVerticalScrollIndicator = NO;
    UIView *contentView = [UIView new];
    contentView.backgroundColor = GreyAuthentic;
    
  
    RecruitmentView *recView = [RecruitmentView new];
    recView.backgroundColor = [UIColor whiteColor];
    recView.rightImg.image = [UIImage imageNamed:@"免费-入驻"];
    [contentView addSubview:recView];
    
    
    TWConvenienceOfServiceBody * convenienceOfServiceBody = [[TWConvenienceOfServiceBody alloc] init];
    convenienceOfServiceBody.backgroundColor = [UIColor redColor];
    [contentView addSubview:convenienceOfServiceBody];
    
    [scrollView addSubview:contentView];
    [self.view addSubview:scrollView];
    
    
    
    [scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0.0f);
    }];
    
    [contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0.0f);
        make.width.height.equalTo(scrollView);
   
 
    }];
    
    [recView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(6.0f);
        make.left.right.offset(0.0f);
        make.height.offset(100.0f);
    }];
    
    [convenienceOfServiceBody mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(recView.mas_bottom).offset(0.0f);
        make.left.right.bottom.offset(0.0f);
       
    }];
    
    
    

    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
